﻿using System.Text;
using Dapper;

using DistpmbyNetCore.DBContext;
using Nancy;
using Newtonsoft.Json;

namespace DistpmbyNetCore.WEB.Module
{
    public sealed class HomeModule:NancyModule
    {
        public HomeModule()
        {
            Get("/", _ =>
            {
                var sb = new StringBuilder();
                using (var db=DapperDbContext.getConn())
                {
                    
                    var list = db.Query<dynamic>("select * from job");
                    return JsonConvert.SerializeObject(list);

                }
                
            });
        }
    }
}
